package com.rightsidetech.system.mapper;

import com.rightsidetech.system.dtos.request.news.AgentAppPageReq;
import com.rightsidetech.system.dtos.request.news.NewsPageReq;
import com.rightsidetech.system.dtos.response.news.AgentAppPageResp;
import com.rightsidetech.system.dtos.response.news.NewsDetailResp;
import com.rightsidetech.system.dtos.response.news.NewsPageResp;
import com.rightsidetech.system.entity.news.SysNews;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SysNewsMapper {
    int deleteByPrimaryKey(Long id);

    int insert(SysNews record);

    int insertSelective(SysNews record);

    SysNews selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(SysNews record);

    int updateByPrimaryKey(SysNews record);

    Long selectCountByTopic(@Param("topic") String topic,@Param("platform") Byte platform);

    List<NewsPageResp> selectPageList(NewsPageReq req);

    NewsDetailResp selectDetail(Long id);

    Long selectCountByTypeId(Long typeId);

    List<AgentAppPageResp> selectAppPageList(@Param("typeId") Long typeId,@Param("platform") Byte platform);
}